<!DOCTYPE html>
<html style="height: 100%">
<head>
    <meta charset="utf-8">
</head>
<body style="height: 100%; margin: 0">
<div id="container" style="height: 100%">

</div>
<script type="text/javascript" src = "__STATIC__/js/echarts/echarts.min.js"></script>
<script type="text/javascript" src = "__STATIC__/js/jquery.js"></script>
<script type="text/javascript">

    var inflow_data;//入库件数的数据
    var outflow_data;//出库件数的数据
//获取出库件数
    $.ajax({
        type: "POST",//规定传输方式
        async:false,
        url: "{:url('storage/Charts/getInflowByYear')}?year=2018",//提交URL
        // data: {'name':$('#name').val(),'age':$('#age').val()},//提交的数据
        success: function(result){
            inflow_data = result;
            console.log('get inflow success');
        }
    });
//获取入库件数
    $.ajax({
        type: "POST",//规定传输方式
        async:false,
        url: "{:url('storage/Charts/getOutflowByYear')}?year=2018",//提交URL
        // data: {'name':$('#name').val(),'age':$('#age').val()},//提交的数据
        success: function(result){
            outflow_data = result;
            console.log("get outflow success");
        }
    });
    var inflow_jan = [],inflow_feb = [],inflow_mar = [],inflow_apr = [],inflow_may = [],inflow_jun = [],inflow_jul = [],inflow_aug = [],inflow_sept = [],inflow_oct = [],inflow_nov = [],inflow_dec = [];
    var outflow_jan = [],outflow_feb = [],outflow_mar = [],outflow_apr = [],outflow_may = [],outflow_jun = [],outflow_jul = [],outflow_aug = [],outflow_sept = [],outflow_oct = [],outflow_nov = [],outflow_dec = [];

    var year = 2018;

    /***
     * 该函数的功能是处理原始数据，将特定月份的数据取出到数组中
     * 如jsonToArr(1,inflow_jan,year,inflow_data)
     * 指的是将inflow_data中1月份每一天出库数量的数据放到inflow_jan数组中
     * @param month 输入月份，数字1到12
     * @param str 处理后的数据存放的数组
     * @param year 年份
     * @param arr 原始数据
     */
    function jsonToArr(month,str,year,arr){
            var day_num;
        if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
            day_num = [0, 31, 29, 31, 30, 31, 30, 31, 31 ,30 ,31 ,30 ,31];//因为day[1]指的是1月的天数，所以day[0]要加一个占位字符。
        }
        else{
            day_num = [0, 31, 28, 31, 30, 31, 30, 31, 31 ,30 ,31 ,30 ,31];
        }
       for(var i = 1;i <= day_num[month];i++){
           str[i-1] = arr[month][i];
       }
    }
    //处理入库数据
    jsonToArr(1,inflow_jan,year,inflow_data);
    jsonToArr(2,inflow_feb,year,inflow_data);
    jsonToArr(3,inflow_mar,year,inflow_data);
    jsonToArr(4,inflow_apr,year,inflow_data);
    jsonToArr(5,inflow_may,year,inflow_data);
    jsonToArr(6,inflow_jun,year,inflow_data);
    jsonToArr(7,inflow_jul,year,inflow_data);
    jsonToArr(8,inflow_aug,year,inflow_data);
    jsonToArr(9,inflow_sept,year,inflow_data);
    jsonToArr(10,inflow_oct,year,inflow_data);
    jsonToArr(11,inflow_nov,year,inflow_data);
    jsonToArr(12,inflow_dec,year,inflow_data);
//处理出库数据
    jsonToArr(1,outflow_jan,year,outflow_data);
    jsonToArr(2,outflow_feb,year,outflow_data);
    jsonToArr(3,outflow_mar,year,outflow_data);
    jsonToArr(4,outflow_apr,year,outflow_data);
    jsonToArr(5,outflow_may,year,outflow_data);
    jsonToArr(6,outflow_jun,year,outflow_data);
    jsonToArr(7,outflow_jul,year,outflow_data);
    jsonToArr(8,outflow_aug,year,outflow_data);
    jsonToArr(9,outflow_sept,year,outflow_data);
    jsonToArr(10,outflow_oct,year,outflow_data);
    jsonToArr(11,outflow_nov,year,outflow_data);
    jsonToArr(12,outflow_dec,year,outflow_data);



    var dom = document.getElementById("container");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    var dataMap = {};
    function dataFormatter(obj) {
        var pList = ['1日','2日','3日','4日','5日','6日','7日','8日','9日','10日','11日','12日','13日','14日','15日','16日','17日','18日','19日','20日','21日','22日','23日','24日','25日','26日','27日','28日','29日','30日','31日'];
        var temp;
        for (var year = 2002; year <= 2013; year++) {
            //实际上指的是1月到12月，该模板year值无法低于2002，否则会报错
            var max = 0;
            var sum = 0;
            temp = obj[year];
            for (var i = 0, l = temp.length; i < l; i++) {
                max = Math.max(max, temp[i]);
                sum += temp[i];
                obj[year][i] = {
                    name : pList[i],
                    value : temp[i]
                }
            }
            obj[year + 'max'] = Math.floor(max / 100) * 100;
            obj[year + 'sum'] = sum;
        }
        return obj;
    }
//这些是原本的模板的数据，日后再扩展或者删除

//出库图表
    dataMap.dataPI = dataFormatter({
        //max : 4000,
        2013:outflow_dec,//2013指的是12月
        2012:outflow_nov,
        2011:outflow_oct,
        2010:outflow_sept,
        2009:outflow_aug,
        2008:outflow_jul,
        2007:outflow_jun,
        2006:outflow_may,
        2005:outflow_apr,
        2004:outflow_mar,
        2003:outflow_feb,
        2002:outflow_jan,//2002指的是1月
    });
//入库图表
    dataMap.dataSI = dataFormatter({
        //max : 25000,
        2013:inflow_dec,
        2012:inflow_nov,
        2011:inflow_oct,
        2010:inflow_sept,
        2009:inflow_aug,
        2008:inflow_jul,
        2007:inflow_jun,
        2006:inflow_may,
        2005:inflow_apr,
        2004:inflow_mar,
        2003:inflow_feb,
        2002:inflow_jan,
    });

    // dataMap.dataTI = dataFormatter({
    //     //max : 25000,
    //     2013:[16251.93,11307.28,24515.76,11237.55,14359.88,22226.7,10568.83,12582,19195.69,49110.27,32318.85,15300.65,17560.18,11702.82,45361.85,26931.03,19632.26,19669.56,53210.28,11720.87,2522.66,10011.37,21026.68,5701.84,8893.12,605.83,12512.3,5020.37,1670.44,2102.21,6610.05],
    //     2012:[12363.18,5219.24,8483.17,3960.87,5015.89,8158.98,3679.91,4918.09,11142.86,20842.21,14180.23,4975.96,6878.74,3921.2,17370.89,7991.72,7247.02,7539.54,24097.7,3998.33,1148.93,3623.81,7014.04,2781.29,3701.79,322.57,4355.81,1963.79,540.18,861.92,2245.12],
    //     2011:[12363.18,5219.24,8483.17,3960.87,5015.89,8158.98,3679.91,4918.09,11142.86,20842.21,14180.23,4975.96,6878.74,3921.2,17370.89,7991.72,7247.02,7539.54,24097.7,3998.33,1148.93,3623.81,7014.04,2781.29,3701.79,322.57,4355.81,1963.79,540.18,861.92,2245.12],
    //     2010:[10600.84,4238.65,7123.77,3412.38,4209.03,6849.37,3111.12,4040.55,9833.51,17131.45,12063.82,4193.69,5850.62,3121.4,14343.14,6607.89,6053.37,6369.27,20711.55,3383.11,953.67,2881.08,6030.41,2177.07,2892.31,274.82,3688.93,1536.5,470.88,702.45,1766.69],
    //     2009:[9179.19,3405.16,6068.31,2886.92,3696.65,5891.25,2756.26,3371.95,8930.85,13629.07,9918.78,3662.15,5048.49,2637.07,11768.18,5700.91,5127.12,5402.81,18052.59,2919.13,748.59,2474.44,5198.8,1885.79,2519.62,240.85,3143.74,1363.27,398.54,563.74,1587.72],
    //     2008:[8375.76,2886.65,5276.04,2759.46,3212.06,5207.72,2412.26,2905.68,7872.23,11888.53,8799.31,3234.64,4346.4,2355.86,10358.64,5099.76,4466.85,4633.67,16321.46,2529.51,643.47,2160.48,4561.69,1652.34,2218.81,218.67,2699.74,1234.21,355.93,475,1421.38],
    //     2007:[7236.15,2250.04,4600.72,2257.99,2467.41,4486.74,2025.44,2493.04,6821.11,9730.91,7613.46,2789.78,3770,1918.95,8620.24,4511.97,3812.34,3835.4,14076.83,2156.76,528.84,1825.21,3881.6,1312.94,1896.78,188.06,2178.2,1037.11,294.91,366.18,1246.89],
    //     2006:[5837.55,1902.31,3895.36,1846.18,1934.35,3798.26,1687.07,2096.35,5508.48,7914.11,6281.86,2390.29,3022.83,1614.65,7187.26,3721.44,3111.98,3229.42,11585.82,1835.12,433.57,1649.2,3319.62,989.38,1557.91,159.76,1806.36,900.16,249.04,294.78,1058.16],
    //     2005:[4854.33,1658.19,3340.54,1611.07,1542.26,3295.45,1413.83,1857.42,4776.2,6612.22,5360.1,2137.77,2551.41,1411.92,5924.74,3181.27,2655.94,2882.88,9772.5,1560.92,377.17,1440.32,2836.73,815.32,1374.62,137.24,1546.59,787.36,213.37,259.49,929.41],
    //     2004:[4092.27,1319.76,2805.47,1375.67,1270,2811.95,1223.64,1657.77,4097.26,5198.03,4584.22,1963.9,2206.02,1225.8,4764.7,2722.4,2292.55,2428.95,8335.3,1361.92,335.3,1229.62,2510.3,661.8,1192.53,123.3,1234.6,688.41,193.7,227.73,833.36],
    //     2003:[3435.95,1150.81,2439.68,1176.65,1000.79,2487.85,1075.48,1467.9,3404.19,4493.31,3890.79,1638.42,1949.91,1043.08,4112.43,2358.86,2003.08,1995.78,7178.94,1178.25,293.85,1081.35,2189.68,558.28,1013.76,96.76,1063.89,589.91,169.81,195.46,753.91],
    //     2002:[2982.57,997.47,2149.75,992.69,811.47,2258.17,958.88,1319.4,3038.9,3891.92,3227.99,1399.02,1765.8,972.73,3700.52,1978.37,1795.93,1780.79,6343.94,1074.85,270.96,956.12,1943.68,480.37,914.5,89.56,963.62,514.83,148.83,171.14,704.5]
    // });

    // dataMap.dataEstate = dataFormatter({
    //     //max : 3600,
    //     2013:[16251.93,11307.28,24515.76,11237.55,14359.88,22226.7,10568.83,12582,19195.69,49110.27,32318.85,15300.65,17560.18,11702.82,45361.85,26931.03,19632.26,19669.56,53210.28,11720.87,2522.66,10011.37,21026.68,5701.84,8893.12,605.83,12512.3,5020.37,1670.44,2102.21,6610.05],
    //     2012:[1074.93,411.46,918.02,224.91,384.76,876.12,238.61,492.1,1019.68,2747.89,1677.13,634.92,911.16,402.51,1838.14,987,634.67,518.04,3321.31,465.68,208.71,396.28,620.62,160.3,222.31,17.44,398.03,134.25,29.05,79.01,176.22],
    //     2011:[1074.93,411.46,918.02,224.91,384.76,876.12,238.61,492.1,1019.68,2747.89,1677.13,634.92,911.16,402.51,1838.14,987,634.67,518.04,3321.31,465.68,208.71,396.28,620.62,160.3,222.31,17.44,398.03,134.25,29.05,79.01,176.22],
    //     2010:[1006.52,377.59,697.79,192,309.25,733.37,212.32,391.89,1002.5,2600.95,1618.17,532.17,679.03,340.56,1622.15,773.23,564.41,464.21,2813.95,405.79,188.33,266.38,558.56,139.64,223.45,14.54,315.95,110.02,25.41,60.53,143.44],
    //     2009:[1062.47,308.73,612.4,173.31,286.65,605.27,200.14,301.18,1237.56,2025.39,1316.84,497.94,656.61,305.9,1329.59,622.98,546.11,400.11,2470.63,348.98,121.76,229.09,548.14,136.15,205.14,13.28,239.92,101.37,23.05,47.56,115.23],
    //     2008:[844.59,227.88,513.81,166.04,273.3,500.81,182.7,244.47,939.34,1626.13,1052.03,431.27,506.98,281.96,1104.95,512.42,526.88,340.07,2057.45,282.96,95.6,191.21,453.63,104.81,195.48,15.08,193.27,93.8,19.96,38.85,89.79],
    //     2007:[821.5,183.44,467.97,134.12,191.01,410.43,153.03,225.81,958.06,1365.71,981.42,366.57,511.5,225.96,953.69,447.44,409.65,301.8,2029.77,239.45,67.19,196.06,376.84,93.19,193.59,13.24,153.98,83.52,16.98,29.49,91.28],
    //     2006:[658.3,156.64,397.14,117.01,136.5,318.54,131.01,194.7,773.61,1017.91,794.41,281.98,435.22,184.67,786.51,348.7,294.73,254.81,1722.07,192.2,44.45,158.2,336.2,80.24,165.92,11.92,125.2,73.21,15.17,25.53,68.9],
    //     2005:[493.73,122.67,330.87,106,98.75,256.77,112.29,163.34,715.97,799.73,688.86,231.66,331.8,171.88,664.9,298.19,217.17,215.63,1430.37,165.05,38.2,143.88,286.23,76.38,148.69,10.02,108.62,63.78,14.1,22.97,55.79],
    //     2004:[436.11,106.14,231.08,95.1,73.81,203.1,97.93,137.74,666.3,534.17,587.83,188.28,248.44,167.2,473.27,236.44,204.8,191.5,1103.75,122.52,30.64,129.12,264.3,68.3,116.54,5.8,95.9,56.84,13,20.78,53.55],
    //     2003:[341.88,92.31,185.19,78.73,61.05,188.49,91.99,127.2,487.82,447.47,473.16,162.63,215.84,138.02,418.21,217.58,176.8,186.49,955.66,100.93,25.14,113.69,231.72,59.86,103.79,4.35,83.9,48.09,11.41,16.85,47.84],
    //     2002:[298.02,73.04,140.89,65.83,51.48,130.94,76.11,118.7,384.86,371.09,360.63,139.18,188.09,125.27,371.13,199.31,145.17,165.29,808.16,82.83,21.45,90.48,210.82,53.49,95.68,3.42,77.68,41.52,9.74,13.46,43.04]
    // });
    //
    // dataMap.dataFinancial = dataFormatter({
    //     //max : 3200,
    //     2013:[16251.93,11307.28,24515.76,11237.55,14359.88,22226.7,10568.83,12582,19195.69,49110.27,32318.85,15300.65,17560.18,11702.82,45361.85,26931.03,19632.26,19669.56,53210.28,11720.87,2522.66,10011.37,21026.68,5701.84,8893.12,605.83,12512.3,5020.37,1670.44,2102.21,6610.05],
    //     2012:[2215.41,756.5,746.01,519.32,447.46,755.57,207.65,370.78,2277.4,2600.11,2730.29,503.85,862.41,357.44,1640.41,868.2,674.57,501.09,2916.13,445.37,105.24,704.66,868.15,297.27,456.23,31.7,432.11,145.05,62.56,134.18,288.77],
    //     2011:[2215.41,756.5,746.01,519.32,447.46,755.57,207.65,370.78,2277.4,2600.11,2730.29,503.85,862.41,357.44,1640.41,868.2,674.57,501.09,2916.13,445.37,105.24,704.66,868.15,297.27,456.23,31.7,432.11,145.05,62.56,134.18,288.77],
    //     2010:[1863.61,572.99,615.42,448.3,346.44,639.27,190.12,304.59,1950.96,2105.92,2326.58,396.17,767.58,241.49,1361.45,697.68,561.27,463.16,2658.76,384.53,78.12,496.56,654.7,231.51,375.08,27.08,384.75,100.54,54.53,97.87,225.2],
    //     2009:[1603.63,461.2,525.67,361.64,291.1,560.2,180.83,227.54,1804.28,1596.98,1899.33,359.6,612.2,165.1,1044.9,499.92,479.11,402.57,2283.29,336.82,65.73,389.97,524.63,194.44,351.74,23.17,336.21,88.27,45.63,75.54,198.87],
    //     2008:[1519.19,368.1,420.74,290.91,219.09,455.07,147.24,177.43,1414.21,1298.48,1653.45,313.81,497.65,130.57,880.28,413.83,393.05,334.32,1972.4,249.01,47.33,303.01,411.14,151.55,277.66,22.42,287.16,72.49,36.54,64.8,171.97],
    //     2007:[1302.77,288.17,347.65,218.73,148.3,386.34,126.03,155.48,1209.08,1054.25,1251.43,223.85,385.84,101.34,734.9,302.31,337.27,260.14,1705.08,190.73,34.43,247.46,359.11,122.25,168.55,11.51,231.03,61.6,27.67,51.05,149.22],
    //     2006:[982.37,186.87,284.04,169.63,108.21,303.41,100.75,74.17,825.2,653.25,906.37,166.01,243.9,79.75,524.94,219.72,174.99,204.72,899.91,129.14,16.37,213.7,299.5,89.43,143.62,6.44,152.25,50.51,23.69,36.99,99.25],
    //     2005:[840.2,147.4,213.47,135.07,72.52,232.85,83.63,35.03,675.12,492.4,686.32,127.05,186.12,69.55,448.36,181.74,127.32,162.37,661.81,91.93,13.16,185.18,262.26,73.67,130.5,7.57,127.58,44.73,20.36,32.25,80.34],
    //     2004:[713.79,136.97,209.1,110.29,55.89,188.04,77.17,32.2,612.45,440.5,523.49,94.1,171,65.1,343.37,170.82,118.85,118.64,602.68,74,11.56,162.38,236.5,60.3,118.4,5.4,90.1,42.99,19,27.92,70.3],
    //     2003:[635.56,112.79,199.87,118.48,55.89,145.38,73.15,32.2,517.97,392.11,451.54,87.45,150.09,64.31,329.71,165.11,107.31,99.35,534.28,61.59,10.68,147.04,206.24,48.01,105.48,4.74,77.87,42.31,17.98,24.8,64.92],
    //     2002:[561.91,76.86,179.6,124.1,48.39,137.18,75.45,31.6,485.25,368.86,347.53,81.85,138.28,76.51,310.07,158.77,96.95,92.43,454.65,35.86,10.08,134.52,183.13,41.45,102.39,2.81,67.3,42.08,16.75,21.45,52.18]
    // });


    option = {
        baseOption: {
            timeline: {
                // y: 0,
                axisType: 'category',
                // realtime: false,
                // loop: false,
                autoPlay: true,
                // currentIndex: 2,
                playInterval: 1000,
                // controlStyle: {
                //     position: 'left'
                // },
                data: [
                    {
                        value: '0001',
                        tooltip: {
                            formatter: '1月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0002',
                        tooltip: {
                            formatter: '2月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0003',
                        tooltip: {
                            formatter: '3月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0004',
                        tooltip: {
                            formatter: '4月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0005',
                        tooltip: {
                            formatter: '5月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0006',
                        tooltip: {
                            formatter: '6月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0007',
                        tooltip: {
                            formatter: '7月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0008',
                        tooltip: {
                            formatter: '8月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0009',
                        tooltip: {
                            formatter: '9月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0010',
                        tooltip: {
                            formatter: '10月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0011',
                        tooltip: {
                            formatter: '11月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },
                    {
                        value: '0012',
                        tooltip: {
                            formatter: '12月'
                        },
                        symbol: 'diamond',
                        symbolSize: 16
                    },

                ],
                label: {
                    formatter : function(s) {
                        return (new Date(s)).getFullYear();
                    }
                }
            },
            title: {
                subtext: 'iwarehouseX'
            },
            tooltip: {
            },
            legend: {
                x: 'right',
                data: ['出库件数', '入库件数'],

            },
            calculable : true,
            grid: {
                top: 300,
                bottom: 100,
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow',
                        label: {
                            show: true,
                            formatter: function (params) {
                                return params.value.replace('\n', '');
                            }
                        }
                    }
                }
            },
            xAxis: [
                {
                    'type':'category',
                    'axisLabel':{'interval':0},
                    'data':[
                        '1日','\n2日','3日','\n4日','5日','\n6日','7日','\n8日',
                        '9日','\n10日','11日','\n12日','13日','\n14日','15日','\n16日',
                        '17日','\n18日','19日','\n20日','21日','\n22日','23日','\n24日',
                        '25日','\n26日','27日','\n28日','29日','\n30日','31日'
                    ],
                    splitLine: {show: false}
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '件数'
                }
            ],
            series: [

                {name: '出库件数', type: 'bar'},
                {name: '入库件数', type: 'bar'},

                {
                    name: '件数占比',
                    type: 'pie',
                    center: ['85%', '20%'],
                    radius: '28%',
                    z: 100
                }
            ]
        },
        options: [
            {
                title: {text: year+'年1月出入库数据'},
                series: [
                    // {data: dataMap.dataFinancial['2002']},
                    // {data: dataMap.dataEstate['2002']},
                    {data: dataMap.dataPI['2002']},
                    {data: dataMap.dataSI['2002']},
                    // {data: dataMap.dataTI['2002']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2002sum']},
                            {name: '入库件数', value: dataMap.dataSI['2002sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2002sum']}
                        ]}
                ]
            },
            {
                title : {text:year+ '年2月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2003']},
                    // {data: dataMap.dataEstate['2003']},
                    {data: dataMap.dataPI['2003']},
                    {data: dataMap.dataSI['2003']},
                    // {data: dataMap.dataTI['2003']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2003sum']},
                            {name: '入库件数', value: dataMap.dataSI['2003sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2003sum']}
                        ]}
                ]
            },
            {
                title : {text: year+'年3月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2004']},
                    // {data: dataMap.dataEstate['2004']},
                    {data: dataMap.dataPI['2004']},
                    {data: dataMap.dataSI['2004']},
                    // {data: dataMap.dataTI['2004']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2004sum']},
                            {name: '入库件数', value: dataMap.dataSI['2004sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2004sum']}
                        ]}
                ]
            },
            {
                title : {text: year+'年4月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2005']},
                    // {data: dataMap.dataEstate['2005']},
                    {data: dataMap.dataPI['2005']},
                    {data: dataMap.dataSI['2005']},
                    // {data: dataMap.dataTI['2005']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2005sum']},
                            {name: '入库件数', value: dataMap.dataSI['2005sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2005sum']}
                        ]}
                ]
            },
            {
                title : {text:year+ '年5月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2006']},
                    // {data: dataMap.dataEstate['2006']},
                    {data: dataMap.dataPI['2006']},
                    {data: dataMap.dataSI['2006']},
                    // {data: dataMap.dataTI['2006']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2006sum']},
                            {name: '入库件数', value: dataMap.dataSI['2006sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2006sum']}
                        ]}
                ]
            },
            {
                title : {text:year+ '年6月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2007']},
                    // {data: dataMap.dataEstate['2007']},
                    {data: dataMap.dataPI['2007']},
                    {data: dataMap.dataSI['2007']},
                    // {data: dataMap.dataTI['2007']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2007sum']},
                            {name: '入库件数', value: dataMap.dataSI['2007sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2007sum']}
                        ]}
                ]
            },
            {
                title : {text: year+'年7月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2008']},
                    // {data: dataMap.dataEstate['2008']},
                    {data: dataMap.dataPI['2008']},
                    {data: dataMap.dataSI['2008']},
                    // {data: dataMap.dataTI['2008']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2008sum']},
                            {name: '入库件数', value: dataMap.dataSI['2008sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2008sum']}
                        ]}
                ]
            },
            {
                title : {text: year+'年8月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2009']},
                    // {data: dataMap.dataEstate['2009']},
                    {data: dataMap.dataPI['2009']},
                    {data: dataMap.dataSI['2009']},
                    // {data: dataMap.dataTI['2009']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2009sum']},
                            {name: '入库件数', value: dataMap.dataSI['2009sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2009sum']}
                        ]}
                ]
            },
            {
                title : {text:year+ '年9月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2010']},
                    // {data: dataMap.dataEstate['2010']},
                    {data: dataMap.dataPI['2010']},
                    {data: dataMap.dataSI['2010']},
                    // {data: dataMap.dataTI['2010']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2010sum']},
                            {name: '入库件数', value: dataMap.dataSI['2010sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2010sum']}
                        ]}
                ]
            },
            {
                title : {text: year+'年10月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2011']},
                    // {data: dataMap.dataEstate['2011']},
                    {data: dataMap.dataPI['2011']},
                    {data: dataMap.dataSI['2011']},
                    // {data: dataMap.dataTI['2011']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2011sum']},
                            {name: '入库件数', value: dataMap.dataSI['2011sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2011sum']}
                        ]}
                ]
            },
            {
                title : {text: year+'年11月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2012']},
                    // {data: dataMap.dataEstate['2012']},
                    {data: dataMap.dataPI['2012']},
                    {data: dataMap.dataSI['2012']},
                    // {data: dataMap.dataTI['2012']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2012sum']},
                            {name: '入库件数', value: dataMap.dataSI['2012sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2012sum']}
                        ]}
                ]
            },
            {
                title : {text:year+ '年12月出入库数据'},
                series : [
                    // {data: dataMap.dataFinancial['2013']},
                    // {data: dataMap.dataEstate['2013']},
                    {data: dataMap.dataPI['2013']},
                    {data: dataMap.dataSI['2013']},
                    // {data: dataMap.dataTI['2013']},
                    {data: [
                            {name: '出库件数', value: dataMap.dataPI['2013sum']},
                            {name: '入库件数', value: dataMap.dataSI['2013sum']},
                            // {name: '第三产业', value: dataMap.dataTI['2013sum']}
                        ]}
                ]
            }
        ]
    };;
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
</script>

</body>
</html>